the formatting of Lua multi-line strings messes up the source structure,
in the following MWE, the "one" is displayed after "[[":
\starttext
\startLUA
words = [[
one
two
three
]]
\stopLUA
\stoptext
I can reproduce this. As a workaround, you can insert a non-bre
Hi,
the formatting of Lua multi-line strings messes up the source structure,
in the following MWE, the "one" is displayed after "[[":
\starttext
\startLUA
words = [[
one
two
three
]]
\stopLUA
\stoptext
(Denis recognized that in his MAPS/CGJ article on ligatur
On Thu, Sep 3, 2020 at 5:53 AM Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:
> Christoph Reller schrieb am 03.09.2020 um 05:29:
> > Dear List,
> >
> > I am using ConTeXt LMTX 2018.05.19 21:46. Consider the following MWE:
> >
> > \st
Christoph Reller schrieb am 03.09.2020 um 05:29:
Dear List,
I am using ConTeXt LMTX 2018.05.19 21:46. Consider the following MWE:
\starttext
\startLUA
whatever
\stopLUA
\stoptext
In contrast to ConTeXt MKIV, the leading four spaces in front of
"whatever" are not removed when
Dear List,
I am using ConTeXt LMTX 2018.05.19 21:46. Consider the following MWE:
\starttext
\startLUA
whatever
\stopLUA
\stoptext
In contrast to ConTeXt MKIV, the leading four spaces in front of "whatever"
are not removed when processing the verbatim text:
MKIV output:
what
]}]])}
Is it defined?:
\startlua
if [[{\in[seac]}]] == "??" then
context("undefined")
else
context("defined")
end
\stoplua
\stoptext
Is there a way to deal with undefined references?
I mean, I need a conditional to handle u
Dear list,
consider the following sample:
\setuppapersize[A8]
\starttext
\ConTeXt:
\in[seac]
Is it defined?:
\doifelse{\in[seac]}{??}{undefined}{defined}
\Lua:
\ctxlua{context([[{\in[seac]}]])}
Is it defined?:
\startlua
if [[{\in[seac
> A solution which uses only existing commands in the document.
>
> \startsetups [martin]
> \startlua
> local points = tonumber(\getvariable{martin}{question}) or 0 ;
> points = points * 92 ;
> local answer = 42 ;
> context.setv
isting commands in the document.
>
> \startsetups [martin]
> \startlua
> local points = tonumber(\getvariable{martin}{question}) or 0 ;
>points = points * 92 ;
> local answer = 42 ;
> context.setvariable("martin","points
A solution which uses only existing commands in the document.
\startsetups [martin]
\startlua
local points = tonumber(\getvariable{martin}{question}) or 0 ;
points = points * 92 ;
local answer = 42 ;
context.setvariable("martin","
> lua error on line 6 in file /tmp/uhd8RE/texweb.tex:
[ctxlua]:1: attempt to call a nil value (field 'getinfo')
1 % generated by live script
2 \setupexternalfigures[location={local,global,default}]
3 \starttext
4 \start
fonts (second stage)
> fonts > 'fallback modern-designsize rm 12pt' is loaded
>
> lua error > lua error on line 6 in file /tmp/uhd8RE/texweb.tex:
>
> [ctxlua]:1: attempt to call a nil value (field 'getinfo')
>
> 1 % genera
On 15/08/18 17:46, Jan U. Hasecke wrote:
On 14.08.2018 16:58, Pablo Rodriguez wrote:
I rewrote your sample as (xtables are the only tables I know in ConTeXt):
\starttext
\startlua
context.startxtable()
context.startxrow()
context.startxcell
On 14.08.2018 16:58, Pablo Rodriguez wrote:
> I rewrote your sample as (xtables are the only tables I know in ConTeXt):
>
> \starttext
> \startlua
> context.startxtable()
> context.startxrow()
> context.startxcell()
>
s are the only tables I know in ConTeXt):
\starttext
\startlua
context.startxtable()
context.startxrow()
context.startxcell()
context("Note 1")
context.stopxcell()
context.startxcell()
context("Note 2&q
I must confess that this is a new knowledge to me.
I thought that "[[ ]]" was the form to escape what I think it is the
escape character in Lua.
How I came to that assumption? Probably because I tried to add a raw
command to \ctxlua or inside a \startlua...\stoplua.
> You can jus
Dear list,
I have the following sample (adapted from
https://stackoverflow.com/q/50442185):
✂️
\starttext
\startlua
--
-- UTILITY FUNCTIONS
--
-- transform a string of bytes in a string of hexadecimal digits
local function str2hexa (s
On 2/12/2018 5:00 PM, Pablo Rodriguez wrote:
Dear list,
I have the following sample:
\starttext
\startlua
a = "a bc de"
context(string.collapsespaces(a))
\stoplua
\stoptext
Sorry for the stupid question, but isn’t the collapsespaces function
intended
Dear list,
I have the following sample:
\starttext
\startlua
a = "a bc de"
context(string.collapsespaces(a))
\stoplua
\stoptext
Sorry for the stupid question, but isn’t the collapsespaces function
intended to remove spaces?
What am I missing here?
Many thank
comment: \inlineTEX{ag%befe}
\Lua\ inline comment: \inlineLUA{agb --efe}
\startTEX
This is text. % a comment, not \comment
\stopTEX
\startXML
This is text.
\stopXML
\startLUA
if code=="code" then --this is a comment
\stopLUA
\stopTEXpage
\stoptext
> On 22 Dec 2017, at 4
\starttext
\startTEXpage[offset=2em]
\startLUA
--[[
multiline comment
]]--
---[[
multiline comment
]]---
\stopLUA
\stopTEXpage
\stoptext
Many thanks for your help again,
\context{ag%befe}
>
> \Lua\ inline comment: \lua{agb --efe}
>
> \startTEX
> This is text. % a comment, not \comment
> \stopTEX
>
> \startXML
> This is text.
> \stopXML
>
> \startLUA
> if code=="code" then
}
\Lua\ inline comment: \lua{agb --efe}
\startTEX
This is text. % a comment, not \comment
\stopTEX
\startXML
This is text.
\stopXML
\startLUA
if code=="code" then --this is a comment
\stopLUA
\stopTEXpage
\stoptext
Would it b
, not \comment
\stopTEX
\startXML
This is text.
\stopXML
\startLUA
if code=="code" then --this is a comment
\stopLUA
\stopTEXpage
\stoptext
Would it be possible that all comments in type and typing (at least, for
Lua, XML and TeX) would have the same formatting for
}
\startTEX
This is text. % a comment, not \comment
\stopTEX
\startXML
This is text.
\stopXML
\startLUA
if code=="code" then --this is a comment
\stopLUA
\stopTEXpage
\stoptext
Would it be possible that all comments in type and typing (at least, fo
This is text.
\stopXML
\startLUA
if code=="code" then --this is a comment
--[[
this is a
multiline comment
--]]
not part of the comment
---[[
this isn’t a
multiline comment
---]]
\stopLUA
\stopTEXpage
\stoptext
I’m experien
[offset=1em]
\startTEX
This is text. % and this is a comment
\stopTEX
\startXML
This is text.
\stopXML
\startLUA
if code=="code" then --this is a comment
--[[
this is a
multiline comment
--]]
---[[
this isn’t a
multili
Hans,
I have the following sample:
\starttext
\startTEXpage[offset=1em]
\startTEX
This is text. % and this is a comment
\stopTEX
\startXML
This is text.
\stopXML
\startLUA
if code=="code" then --this is a comment
--[[
and this is a
know how to do it
>> for \mainlanguage (**en).
>> \mainlanguage[es]
>> \starttext
>> \en\startlua
>> if tex.systemmodes['en'] then
>> context('Language is English.')
>> else
>> context('Language is not Englis
)?
This is the way to detect system modes, but I don’t know how to do it
for \mainlanguage (**en).
\mainlanguage[es]
\starttext
\en\startlua
if tex.systemmodes['en'] then
context('Language is English.')
else
context('Language is not English.')
end
context
On 05/31/2017 04:51 PM, Pablo Rodriguez wrote:
> [...]
> This is the way to detect system modes, but I don’t know how to do it
> for \mainlanguage (**en).
It was simple (not even using tex.systemmodes):
\mainlanguage[es]
\starttext
\en\startlua
if tex.m
odes (*en)?
This is the way to detect system modes, but I don’t know how to do it
for \mainlanguage (**en).
\mainlanguage[es]
\starttext
\en\startlua
if tex.systemmodes['en'] then
context('Language is English.')
else
context('Language is not English.')
On 1/18/2017 4:29 PM, DesdeChaves wrote:
Dear sirs,
Is there a way to compare, in TeX environment, a value returned from a
lua function with a TeX variable?
Please see this code:
\def\aleatorioValue{
\startlua
local nu = math.random(1,10);
if nu<5 return 1 else return 0 end
\stop
Dear sirs,
Is there a way to compare, in TeX environment, a value returned from a lua
function with a TeX variable?
Please see this code:
\def\aleatorioValue{
\startlua
local nu = math.random(1,10);
if nu<5 return 1 else return 0 end
\stoplua
}
\edef\controlValue{1}
\edef\inferior{Number
gt; --- example --
>
> \usemodule[scancsv]
>
> \def\ddmm#1#2#3{% #1 - date, #2 - old separator, #3 - new separator
> \startlua
> local parsedate=thirddata.scancsv.ParseCSVLine('#1','#2');
> local day=tonumber(parsedate[1]);
> local month=tonumber(parsedate
d data to the output. The
result is a empty pdf.
The example attached is from a old question.
Thanks a lot for your time
Jorge M.
--- example --
\usemodule[scancsv]
\def\ddmm#1#2#3{% #1 - date, #2 - old separator, #3 - new separator
\startlua
local parsedate=thirddata.scancsv.P
', 'G', 'u', 'v', 'W'}
\stopluacode
\define\RandomFunctionName
{\startlua
local listsize= \letterhash Name ;
local randomvalue = math.random(1,listsize) ;
context(Name[randomvalue])
\stoplua}
\dorecurse{10}{Give an example of a function $\RandomFunctionName : {\Bbb
R
', 'W'}
\stopluacode
\define\RandomFunctionName
{\startlua
local listsize= \letterhash Name ;
local randomvalue = math.random(1,listsize) ;
context(Name[randomvalue])
\stoplua}
\dorecurse{10}{Give an example of a function $\RandomFunctionName : {\Bbb R}
\longrightarrow {\Bbb R
Name = {'F', 'G', 'u', 'v', 'W'}
\stopluacode
\define\RandomFunctionName
{\startlua
local listsize= \letterhash Name ;
local randomvalue = math.random(1,listsize) ;
context(Name[randomvalue])
\stoplua}
\dorecurse{10}{Give an example of a function $\RandomFunctionName : {\Bbb R
when you use it in a TeX command because # is already taken
for the TeX arguments.
\starttext
\startluacode
Name = {'F', 'G', 'u', 'v', 'W'}
\stopluacode
\define\RandomFunctionName
{\startlua
local listsize= \letterhash Name ;
local randomvalue = math.random(1,listsize
to replace #
with \letterhash when you use it in a TeX command because # is already taken
for the TeX arguments.
\starttext
\startluacode
Name = {'F', 'G', 'u', 'v', 'W'}
\stopluacode
\define\RandomFunctionName
{\startlua
local listsize= \letterhash Name ;
local randomvalue
#
with \letterhash when you use it in a TeX command because # is already taken
for the TeX arguments.
\starttext
\startluacode
Name = {'F', 'G', 'u', 'v', 'W'}
\stopluacode
\define\RandomFunctionName
{\startlua
local listsize= \letterhash Name ;
local randomvalue
Hi Pablo
Here is a quick solution. However, it not treat the incorrect input
data, ie it requires, however, correct input, otherwise it will collapse ...
Jaroslav Hajtmar
\usemodule[scancsv]
\def\ddmm#1#2#3{% #1 - date, #2 - old separator, #3 - new separator
\startlua
parsedate
used.
Sincerely
Jaroslav Hajtmar
\usemodule[scancsv]
\def\ddmm#1#2#3{% #1 - date, #2 - old separator, #3 - new separator
\startlua
local parsedate=thirddata.scancsv.ParseCSVLine('#1','#2');
local day=tonumber(parsedate[1]);
local month=tonumber(parsedate[2]);
local year
defined in
the library, so that it can be successfully used.
Many thanks for your reply, Jaroslav.
This is exactly what I need.
Many thanks for your help,
Pablo
\usemodule[scancsv]
\def\ddmm#1#2#3{% #1 - date, #2 - old separator, #3 - new separator
\startlua
local parsedate
), while 01/02/15 mean old man ie. in fact 01/02/1915. For the
specific case you have to modify or create the solution separately.
Greetings
Jaroslav Hajtmar
Here is new minimal example:
\usemodule[scancsv]
\def\ddmm#1#2#3{% #1 - date, #2 - old separator, #3 - new separator
\startlua
local
},
[startJSpreamble]={ 127, 290644, 49920 },
[startLUA]={ 127, 245948, 28541 },
[startLuaSnippet]={ 127, 244345, 530 },
[startLuaSnippetBoundary]={ 127, 246417, 46341 },
[startLuaSnippetComment]={ 127, 247113, 23071 },
[startLuaSnippetName]={ 127, 246301, 9781 },
[startLuaSnippetNameBase]={ 127, 244439
comma command.
You can also try to use a Lua variant.
\def\states_entry_indeed[#1][#2]%
{\startlua
local entries = utilities.parsers.settings_to_array(#1)
local entry = entries[#2]
if entry then
context(entry)
else
context(\\tttf NO ENTRY!)
end
\stoplua}
Wolfgang
On 7-6-2012 18:02, Wolfgang Schuster wrote:
You can also try to use a Lua variant.
\def\states_entry_indeed[#1][#2]%
{\startlua
local entries = utilities.parsers.settings_to_array(#1)
local entry = entries[#2]
if entry then
context(entry)
else
context(\\tttf NO ENTRY
Am 07.06.2012 um 18:16 schrieb Hans Hagen:
On 7-6-2012 18:02, Wolfgang Schuster wrote:
You can also try to use a Lua variant.
\def\states_entry_indeed[#1][#2]%
{\startlua
local entries = utilities.parsers.settings_to_array(#1)
local entry = entries[#2]
if entry
)
else
context(NOT EMPTY)
end
end
\stopluacode
\setvariable{wagner}{name}{Wagner Macedo}
\starttext
\ctxlua{userdata.checkvariable(\getvariable{wagner}{name})}
% This does only with \startlua or \ctxlua
\startlua
local name = \getvariable{wagner}{name}
if name
}
\starttext
\ctxlua{userdata.checkvariable(\getvariable{wagner}{name})}
% This does only with \startlua or \ctxlua
\startlua
local name = \getvariable{wagner}{name}
if name == then
context(No Text)
else
name = Name: .. name
context(name)
end
\stoplua
\stoptext
A different method
Am 01.01.2012 um 08:00 schrieb luigi scarso:
On Sun, Jan 1, 2012 at 4:28 AM, Michael Talbot-Wilson m...@view.net.au
wrote:
I thought I'd see if I could use ConTeXt. Here is my first try, hello.tex.
\starttext
\input header
Hello, World!\startlua
a = 1.5
b = 1.8
c = a * b
tex.print
I thought I'd see if I could use ConTeXt. Here is my first try, hello.tex.
\starttext
\input header
Hello, World!\startlua
a = 1.5
b = 1.8
c = a * b
tex.print(c)
\stoplua plus1.
\stoptext
Didn't work because the file header.tex could not be found, even
though kpsewhich can find
On Sun, Jan 1, 2012 at 4:28 AM, Michael Talbot-Wilson m...@view.net.au wrote:
I thought I'd see if I could use ConTeXt. Here is my first try, hello.tex.
\starttext
\input header
Hello, World!\startlua
a = 1.5
b = 1.8
c = a * b
tex.print(c)
\stoplua plus1.
\stoptext
Didn't work
On 9-1-2011 10:16, Thomas A. Schmitz wrote:
\starttext
\startLUA
require 'lpeg'
sep = lpeg.P(,)
\stopLUA
\stoptext
I'll put a beta on the ftp for testing. You can configure the string
content as well as the quotes
On Jan 10, 2011, at 2:14 PM, Hans Hagen wrote:
On 9-1-2011 10:16, Thomas A. Schmitz wrote:
\starttext
\startLUA
require 'lpeg'
sep = lpeg.P(,)
\stopLUA
\stoptext
I'll put a beta on the ftp for testing. You can configure the string content
as well as the quotes.
Hi Hans
Hi all,
is this a bug or a feature: in verbatim lua code, my double and ' single
quotation marks are eaten up in mkiv (everything is colorless, but correct in
mkii). Example:
\starttext
\startLUA
require 'lpeg'
sep = lpeg.P(,)
\stopLUA
\stoptext
Thanks
Thomas
{typefile-test} % problem here
\stop
\section{file=zzz, lua=xxx-yyy}
\start
\setuptyping[file][option=LUA, escape=ZZZ]
\setuptyping[LUA][option=LUA, escape={XXX,YYY}]
\startLUA
btex-etex: // /btex \em sometex /etex
xxx-yyy:// XXX \em sometex YYY
zzz:// ZZZ \em sometex
\stopLUA
\typefile
}]
\starttext
\startLUA
bla // /btex\em sometex /etex
\stopLUA
\stoptext
Hopefully you wikify this
Hans
-
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt
Hello,
\starttext
\startLUA
printbla -- words are transposed!
\stopLUA
\stoptext
Cheers, Peter
--
Contact information: http://pmrb.free.fr/contact/
___
If your question is of interest
On 10-5-2010 10:43, Peter Münster wrote:
\starttext
\startLUA
printbla-- words are transposed!
\stopLUA
\stoptext
in pret-lua.lua, line 265:
elseif c == '' or c == ' then
if word then
state = flush_lua_word(state,word)
word = nil
end
On 7-4-2010 5:13, Hongwen Qiu wrote:
\startLUA
string.format(%s %d, person, total)
\stopLUA
space handling fixed in next beta
-
Hans Hagen | PRAGMA ADE
Ridderstraat 27
\startLUA
string.format(%s %d, person, total)
\stopLUA
produces the result as following:
string.format(%s%d, person, total)
while the following code has no such problem:
\starttyping
string.format(%s %d, person, total)
\stoptyping
$ context --version
MTXrun | current version: 2010.03.30 18:56
Matthijs Kooijman wrote:
Hi all,
according to the wiki, and the current code, the arguments to
\installprettytype should be uppercased. E.g.:
because want uppercase
\startTEX
\stopTEX
\startMP
\stopMP
\startLUA
\stopLUA
\installprettytype [PHP][PHP]
Referring to them should
,colorscheme=blackandwhite]
\startLUA
-- version : 1.0.0 - 07/2005
-- author: Hans Hagen - PRAGMA ADE - www.pragma-ade.com
-- copyright : public domain or whatever suits
-- remark: part of the context distribution
-- TODO: name space for local functions
-- loading: scite-ctx.properties
...
\testmacro ...\directlua 0{d='\luaescapestring {#1
}'}
l.8 \stoptabulate}
?
=
I've tried all sorts of variations on the above example including using
\ctxlua, \startlua, \startluacode, etc. I tried using
Dear all,
I'm trying to implement a very simple filter mechanism in lua like this:
\def\test#1{%
\startlua
local pipe, str
pipe = io.popen(./my_filter '\luaescapestring{#1}', r)
str = pipe:read(*a)
tex.print(str)
pipe:close()
\stoplua
}
\test{%
line 1
line 2
Taco Hoekwater wrote:
luigi scarso wrote:
In
\starttext
\startTEXpage
\startlua
metapost.process(metafun,{beginfig(1);,
a=.7in; b=0.5in;,
z0=(0,0); z1=(a,0); z2=(0,b);,
z0=.5[z1,z3]=.5[z2,z4];,
draw z1..z2..z3..z4..cycle;,
drawarrow z0..z1;,
drawarrow z0..z2;,
label.top(btex
luigi scarso wrote:
In
\starttext
\startTEXpage
\startlua
metapost.process(metafun,{beginfig(1);,
a=.7in; b=0.5in;,
z0=(0,0); z1=(a,0); z2=(0,b);,
z0=.5[z1,z3]=.5[z2,z4];,
draw z1..z2..z3..z4..cycle;,
drawarrow z0..z1;,
drawarrow z0..z2;,
label.top(btex $a$ etex, .5[z0,z1
In
\starttext
\startTEXpage
\startlua
metapost.process(metafun,{beginfig(1);,
a=.7in; b=0.5in;,
z0=(0,0); z1=(a,0); z2=(0,b);,
z0=.5[z1,z3]=.5[z2,z4];,
draw z1..z2..z3..z4..cycle;,
drawarrow z0..z1;,
drawarrow z0..z2;,
label.top(btex $a$ etex, .5[z0,z1]);,
label.lft(btex $b$ etex, .5[z0,z2
Hallo Taco et al
\startlua
local function finder(name, mode, ftype)
if mode==w then
return name
else
return kpse.find_file(name,ftype)
end
end
Jein!
Try this, a little more elaborate, version of finder:
local function finder(name
\startlua
local function finder(name, mode, ftype)
if mode==w then
return name
else
return kpse.find_file(name,ftype)
end
end
Jein!
The only file in my tex tree which could play that roule is
cont-en-mpost.mem
in the cache
\tex\texmf-cache
Wolfgang Werners-Lucchini wrote:
\startlua
local function finder(name, mode, ftype)
if mode==w then
return name
else
return kpse.find_file(name,ftype)
end
end
Jein!
The only file in my tex tree which could play that roule is
cont-en-mpost.mem
Wolfgang Werners-Lucchini wrote:
\startlua
local function finder(name, mode, ftype)
if mode==w then
return name
else
return kpse.find_file(name,ftype)
end
end
Jein!
Try this, a little more elaborate, version of finder:
local function finder(name
?
---
\starttext
% start low-level
\startlua
local function finder(name, mode, ftype)
if mode==w then
return name
else
return kpse.find_file(name,ftype)
end
end
mp = mplib.new ( {
hash_size = 10,
main_memory = 200,
param_size
that one has
not to adapt 'plain.mp'.
But here too, there is no 'mpost.mem' and no 'mpost.log'.
I have included a test before and after mp:finish().
Can anybody with a minimal under windows run this example?
---
\starttext
% start low-level
\startlua
local function
)
\starttext
\ctxlua{a = 1.5 ; b = 1.8 ; c = a*b ; tex.print(c) ;}
or the equivalent:
\startlua
a = 1.5
b = 1.8
c = a*b
tex.print(c)
\stoplua
You can also do more elaborate calculations with the lua math library
On 15 apr 2008, at 14:52, John Devereux wrote:
4) Now you can try some simple document like (thanks to Arthur
Reutenauer)
\starttext
some statements deleted
\startlua
a = 1.5
b = 1.8
c = a*b
tex.print(c)
\stoplua
\stoptext
Hans van der Meer wrote:
On 15 apr 2008, at 14:52, John Devereux wrote:
4) Now you can try some simple document like (thanks to Arthur
Reutenauer)
\starttext
. some statements deleted
\startlua
a = 1.5
b = 1.8
c = a*b
tex.print(c)
\stoplua
be.
It is not in 'D:\context\tex\texmf-mswin\web2c' where format-files
usally exist.
It is not in the cache.
I run this:
---
\enableregime[utf-8]
\starttext
% start low-level
\startlua
local function finder(name, mode, ftype)
if mode==w
On 13 Apr 2008 at 13:31, [EMAIL PROTECTED] wrote:
Hallo Taco,
thank you for your example.
% start low-level
\startlua
local function finder(name, mode, ftype)
if mode==w then
return name
else
return kpse.find_file(name,ftype)
end
end
mp = mplib.new
Wolfgang Werners-Lucchini wrote:
On 12 Apr 2008 at 9:39, [EMAIL PROTECTED] wrote:
\startlua
mp = mplib.new ( {
hash_size = 10,
main_memory = 200,
param_size = 10,
} )
if mp then
res = mp:execute(
beginfig(1) draw (0,0) .. (1,1) .. (2,1); endfig; bye
Wolfgang Werners-Lucchini wrote:
Hallo,
the following compiles ok, but gives me an status 3=fatal error.
Can someone please point me to the error?
\startlua
mp = mplib.new ( {
hash_size = 10,
main_memory = 200,
param_size = 10,
} )
if mp then
res
On 12 Apr 2008 at 9:39, [EMAIL PROTECTED] wrote:
\startlua
mp = mplib.new ( {
hash_size = 10,
main_memory = 200,
param_size = 10,
} )
if mp then
res = mp:execute(
beginfig(1) draw (0,0) .. (1,1) .. (2,1); endfig; bye; )
tex.print
Hallo,
the following compiles ok, but gives me an status 3=fatal error.
Can someone please point me to the error?
\startlua
mp = mplib.new ( {
hash_size = 10,
main_memory = 200,
param_size = 10,
} )
if mp then
res = mp:execute(
beginfig(1) draw (0,0) .. (1,1) .. (2,1
[]
\setuppublicationlist[]
\setupcite[]
\starttext
Bonjour de luatex!
\blank
LUA \cite[year][destv]
\startlua
a = 1.5
b = 1.8
c = a*b
tex.print(c)
\stoplua
\completepublications[criterium=all]
\stoptext
..
I see this in the messages:
publications : warning: cite argument destv is unknown
[]
| \starttext
| Bonjour de luatex!
| \blank
| LUA \cite[year][destv]
| \startlua
| a = 1.5
| b = 1.8
| c = a*b
| tex.print(c)
| \stoplua
| \completepublications[criterium=all]
| \stoptext
| ..
|
| I see this in the messages:
|
| publications : warning: cite
\starttext
some texts
\startlua
a = 1.5
b = 1.8
c = a*b
tex.print(c)
\stoplua
\stoptext
and it was working nicely.
But when I tested a sample file in the wiki,
\usetypescript[palatino]
\setupbodyfont[palatino,12pt]
\starttext
effe fietsen 2: \input tufte $\sqrt{2}$ \eogonek
\sc effe fietsen 2
/...
I test it using a simple file like
\starttext
some texts
\startlua
a = 1.5
b = 1.8
c = a*b
tex.print(c)
\stoplua
\stoptext
and it was working nicely.
problems like this will go away with the next release, since mkiv will
load patterns at runtime (smaller format, faster loading
\startlua
a = 1.5
b = 1.8
c = a*b
tex.print(c)
\stoplua
\stoptext
But no pdf file appears, and here are some (hopefully) relevant parts of the
compilation message:
TeXExec | unable to fix backend map path
TeXExec | running: luatools --fmt=cont-en test.tex
LuaTools | using format name /cont-en.fmt
Hi all, Following nice reports I read on the list as well as the mag-12
instructions I installed a context minimal linux distribution and
lua-5.1.2.
hmm, try
http://www.lua.org/ftp/lua-5.1.tar.gz
% engine=luatex
\starttext
Hello from luatex
\blank
LUA
\startlua
a = 1.5
b = 1.8
c = a*b
\starttext
Hello from luatex
\blank
LUA
\startlua
a = 1.5
b = 1.8
c = a*b
tex.print(c)
\stoplua
\stoptext
But no pdf file appears, and here are some (hopefully) relevant parts of the
compilation message:
TeXExec | unable to fix backend map path
TeXExec | running: luatools --fmt=cont-en
| \startlua
| a = 1.5
| b = 1.8
| c = a*b
| tex.print(c)
| \stoplua
| \stoptext
| on a linux box
| $texmfstart texexec --pdf test.tex
| compile well.
| Are you under linux ?
Yes, I ought to have said that first!!
Now here is what I tried just now:
1/ reinstall lua by hand
2/ remove everything
| % engine=luatex
| \starttext
| Hello from luatex
| \blank
| LUA
| \startlua
| a = 1.5
| b = 1.8
| c = a*b
| tex.print(c)
| \stoplua
| \stoptext
| on a linux box
| $texmfstart texexec --pdf test.tex
| compile well.
| Are you under linux ?
Yes, I ought to have said that first
and named it texlua and put it in the
texmf-linux/bin
directory.
Then after reading the MyWay on MKIV I did a texexec --make --all --luatex
to generate the formats and ran succesfully the following tex script and
produced a pdf file.
% engine=luatex
\starttext
Hello from luatex
\blank
LUA
\startlua
96 matches
Mail list logo